<template>
  <div class="top">
    <div class="commonwidth">
      <ul>
        <router-link
          tag="li"
          to="/login"
          v-if="!$store.state.login.logo.account"
        >
          <a href="javascript:;">请先登录</a></router-link
        >
        <li v-else>
          <a href="javascript:;">{{ $store.state.login.logo.account }}</a>
        </li>
        <router-link tag="li" to="/" v-if="!$store.state.login.logo.account">
          <a href="javascript:;">免费注册</a>
        </router-link>
        <li v-else @click="tui">
          <a href="javascript:;">退出登录</a>
        </li>
        <li><a href="javascript:;">我的订单</a></li>
        <li><a href="javascript:;">会员中心</a></li>
        <li><a href="javascript:;">帮助中心</a></li>
        <li><a href="javascript:;">关于我们</a></li>
        <li><a href="javascript:;">手机版</a></li>
      </ul>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {};
  },
  methods: {
    tui() {
      this.$store.commit("delete");
      this.$router.push("/login");
    },
  },
};
</script>
<style scoped>
</style>